/*
 * Job.cpp
 *
 *  Created on: 2011-10-18
 *      Author: mateusz
 */

#include "Job.h"

Job::Job(int id, int readyTime, int procsNumber, int runTime) {
	this->id = id;
	this->readyTime = readyTime;
	this->procsNumber = procsNumber;
	this->runTime = runTime;
	this->status = 0;
	this->waitTime = -1;
}

Job::~Job(){

}

void Job::reset() {
	this->status = 0;
}

void Job::setReady() {
	this->status = 1;
}

void Job::startJob() {
	this->status = 2;
}

void Job::finishJob() {
	this->status = 3;
}

bool Job::isReady() {
	return (this->status >= 1);
}

bool Job::isStarted() {
	return (this->status >= 2);
}

bool Job::isFinished() {
	return (this->status >= 3);
}

int Job::getId() {
	return this->id;
}

int Job::getReadyTime() {
	return this->readyTime;
}

int Job::getProcsNumber() {
	return this->procsNumber;
}

int Job::getRunTime() {
	return this->runTime;
}

int Job::getWaitTime(){
	return this->waitTime;
}

void Job::setWaitTime(int waitTime){
	this->waitTime = waitTime;
}
